{% extends "layouts/layout.html" %}
{% block title %}
New Item
{% endblock %}
{% block content %}
<script type="text/javascript" src="/js/items/items.js"></script>
<h3>New Item</h3>
<form action="/items/save_item" id="item_form" method="post" enctype="multipart/form-data">
	<div class="well">
  <input type="hidden" name="xsrf_token" value="{{ xsrf_token }}" key="{{ current_li.key().id() }}"/>
		<p>
			Title*<br />
			<div class="input-prepend">
				<span class="add-on"><i class="icon-tag"></i></span>
				<input name="title" id="title" type="text">
			</div>
		</p>
		<p>
			Description<br />
			<textarea name="description" id="description" class="richtext"></textarea>
		</p>
		<p>
			Price*<br />
			<div class="input-prepend">
				<span class="add-on">$</span>
				<input name="price" id="price" type="text">
			</div>
		</p>
    <p>
      Photo<br />
	  	<span class="file-wrapper input-prepend input-append">
		  <span class="add-on"><i class="icon-picture"></i></span>
		  <input type="file" class="upload_item" name="photo" id="photo" />
		  <span class="btn">Choose a Photo</span>
		  <span class="add-on after_photo"></span>
		</span>
    </p>
    <p>
      <label>
				Enable Bidding? 
				<i class="icon-info-sign info_button-right" title="Enable Bidding" data-content="If checked, then buyers can bid on your item."></i>
			</label>
			<input type="checkbox" name="bidding_enabled" />
    </p>
    {% if current_li.is_admin %}
        <p>
      		<label>
				Sponsor this item? 
				<i class="icon-info-sign info_button-right" title="Sponsor this item (Admin only)" data-content="If checked, then this item can be advertised by all apps."></i>
			</label>
			<input type="checkbox" name="sponsored" />
    	</p>
    {% endif %}
    <p>
    	<label>
            Is this item private? 
            <i class="icon-info-sign info_button-right" title="Make item private" data-content="If unchecked, item can only be viewed by you in your virtual shop."></i>
        </label>
        <input type="checkbox" name="show_item"/>
    </p>
	</div>
	<button class="btn btn-primary" type="submit" value="Save">Post Item</button>
	<a class="btn" href="/items/">Cancel</a>
</form>

{% endblock %}